function aa() {
    var win = document.getElementById('draft_selection');
    win.onmousedown = function(event) {
        var left = event.clientX - win.offsetLeft;
        var top = event.clientY - win.offsetTop;
        document.onmousemove = function(event) {
            var x = event.clientX;
            var y = event.clientY;
            win.style.left = x - left + 'px';
            win.style.top = y - top + 'px';
        }
    }
    win.onmouseup = function(event) {
        document.onmousemove = null;
    }
}
aa();